﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Diagnostics;

namespace RecursosHumanos
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            //Verifica se o progrma já está em execução
            //Process[] ListaProcessos = Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName);
            //foreach (Process P in ListaProcessos)
            //if (P.Id != Process.GetCurrentProcess().Id)
            //{
            //    MessageBox.Show("Este programa já está sendo executado.", "Aviso", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            //    return;
            //}

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            frmLogin login = new frmLogin();
            login.ShowDialog();
            if (login.logado == false)
                return;

            Application.Run(new frmMenu());
        }
    }
}
